<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>答题登陆</title>
    <meta name="Generator" content="vsCode">
    <meta name="Author" content="x">
    <meta name="Keywords" content="">
<!--    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge chrome=1">
    <!--IE8浏览器的显示方式：IE=edge以IE最高版本显示 Chrome=1以谷歌浏览器模式渲染-->
    <meta name="referrer" content="never">
    <!--告诉浏览器链接的来源（可以计算链接的访问量）-->
    <meta name="format-detection" content="telephone=no,email=no,address=no">
    <!--格式检测（数字，邮箱，地址）no 不识别为电话号码，邮箱，地址-->
    <meta name="renderer" content="webkit">
    <meta name="Description" content="">
    <link href="/static/css/bootstrap.min.css" rel="stylesheet" />
    <link href="/static/css/exam/main.css" rel="stylesheet" />
    <link href="/static/css/exam/util.css" rel="stylesheet" />
    <link href="/static/css/exam/font-awesome.min.css" rel="stylesheet" />
    <link href="/static/css/exam/material-design-iconic-font.min.css" rel="stylesheet" />
    <style type="text/css">
        html,body{
            width:100%;
            height:100%;
        }
        body{
            background:url("/static/images/exam_login.png") no-repeat;
            background-size: 100%;
            font-size: 14px;
            padding-top: 19em;
        }
     /*   *{
            margin: 0;
            padding: 0;
        }
        ul,li{
            list-style:none;
        }
        a{
            text-decoration:none;
        }
        input{
            outline-style:none;
            border: 0px;
        }
        #form1{
            width:85%;
            margin:2px auto;
        }
        #form1 form span{
            color:#999;
        }
        .clean{
            margin: 0;
            padding: 0;
            width:100%;
            height:230px;
            position:relative;
            background:url("/static/images/phone.png") no-repeat;
            background-size: 100%;
        }

        .row {
            height: 28px;
            line-height: 20px;
        }
        .input_uname {
            position: relative;
            width: 100%;
            height: 26px;
        }
        .input_uname input {
            display: block;
            margin: 5.8em 0 0 6.5em;
            height: 26px;
            border:none;
            background: none;
            outline:none;
        }
        .input_pwd {
            position: relative;
            width: 100%;
            height: 26px;
        }
        .input_pwd input {
            display: block;
            margin: 1.5em 0 0 6.5em;
            height: 26px;
            border:none;
            background: none;
            outline:none;
        }
        .checkbox{
            margin:0.5em 0 0 4.8em;
            width:60%;
            float: left;
        }
        input[type=date]::-webkit-inner-spin-button { visibility: hidden; }
        .button{
            width:60%;
            height:25px;
            background: #00a0e9;
            outline: none;
            margin:1em 0 0 4.8em;
        }
        .button button{
            border:0px;
            background-color:transparent;
            color:white;
            width: 100%;
            height:25px;
            margin:0 auto;
            font-size:17px;
        }*/
    </style>
</head>

<body>

<div class="wrap-login100 p-l-20 p-r-20 p-t-10 p-b-10" style="margin:1em auto;">
    <form class="login100-form validate-form">
        <div class="wrap-input100 validate-input m-b-10" data-validate="请输入手机号码">
            <span class="label-input100">手机号码</span>
            <input class="input100" type="text"  id="phone" name="phone" placeholder="请输入手机号码" autocomplete="off">
            <span class="focus-input100" data-symbol="&#xf206;"></span>
        </div>

        <div class="wrap-input100 validate-input" data-validate="请输入密码">
            <span class="label-input100">密码</span>
            <input class="input100" type="password" id="password" name="password" placeholder="请输入密码">
            <span class="focus-input100" data-symbol="&#xf23e;"></span>
        </div>

        <div class="text-left p-t-8 p-b-15">
            <a href="javascript:void(0);" onclick="register();">注册登陆</a> <span style="margin-left: 4.5em;"><a href="javascript:void(0);" onclick="findPwd();">忘记密码？</a></span>
        </div>
        <div class="container-login100-form-btn">
            <div class="wrap-login100-form-btn">
                <div class="login100-form-bgbtn"></div>
                <button class="login100-form-btn" type="button" onclick="login();">
                    开始答题
                </button>
            </div>
        </div>
    </form>
</div>
<div class="text-center p-t-8 p-b-15 text-font-color">
    <div>宝鸡市渭滨区总工会</div>
    <div>2020年4月</div>
</div>
<script src="/static/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/static/bower_components/jquery/dist/jquery.cookie.js"></script>
<script src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="/static/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="/static/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript">
    //密码找回
    function findPwd(){
        location.href = "/findPwd";
    }

    function checkForm(phone,pwd){
        if($.trim(phone)==''){
            alert("请输入注册的手机号！");
            return false;
        }
        if($.trim(pwd)==''){
            alert("请输入密码！");
            return false;
        }
        return true;
    }
    function login() {
        var phone = $("#phone").val();
        var pass = $("#password").val();
        if(checkForm(phone,pass)){
            $.ajax({
                url:"/exam/checkStaff",
                type:"post",
                dataType:"json",
                cache:false,
                data:{
                    phone:phone,
                    password:pass
                },
                success:function(data){
                    if(data.status == 'success'){
                        location.href = "/exam/startExam";
                    }else{
                        alert(data.msg);
                    }
                }
            });
        }
    }
    function register() {
        location.href = "/register";
    }
</script>
</body>
</html>
